import Logger from './Logger';

const logger = new Logger('mockAjax');

// 可使用 http://mockjs.com/ 生产模拟数据

const result = {  // 暂存mock的ajax返回, 总共有5个字段
  success: true,
  code: 0,
  message: 'just a mock ;) ',
  data: {},
};

// 模拟统一的延迟, 返回promise对象
const mockPromise = (callback) => {
  return new Promise(resolve => {
    setTimeout(callback, 2000, resolve);
  });
};

export default MockAjax;
